<include file="public@header" />
</head>
<body>
    <div class="layui-fluid js-check-wrap">
        <div class="layui-card">
            <div class="layui-card-header well">
                <div class="layui-col-xs6">
                    <h3>评价中心列表</h3>
                </div>
                <div class="layui-col-xs6 text-right">
                    <a href="{:url('AdminQuest/add')}" class="layui-btn layui-btn-normal">添加调查问卷</a>
                </div>
            </div>

            <div class="layui-card-body">
                <table class="layui-table" >
                    <thead>
                        <tr>
                            <th width="50">ID</th>
                            <th>标题</th>
                            <th>简介</th>
                            <th>开启时间</th>
                            <th>结束时间</th>
                            <th>状态</th>
                            <th>提交用户人数</th>
                            <th>评价结果</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <foreach name="data" item="vo">
                        <tr>
                            <td>{$vo.id}</td>
                            <td>{$vo.name}</td>
                            <td>{$vo.intro}</td>
                            <td>{:date("Y-m-d H:i:s",$vo['start_time'])}</td>
                            <td>{:date("Y-m-d H:i:s",$vo['end_time'])}</td>
                            <td>
                                <if condition="$vo['end_time'] gt time()">
                                    <span class="layui-btn layui-btn-xs layui-btn-danger">进行中</span>
                                    <else/>
                                    <span class="layui-btn layui-btn-xs layui-btn-normal">已结束</span>
                                </if>
                            </td>
                            <td>{$vo.num}</td>
                            <if condition="$vo['sum'] neq ''">
                            <td>满意:{:round($vo['answer1']/($vo['sum']),2)*100 }%<br>
                                基本满意:{:round($vo['answer2']/($vo['sum']),2)*100 }%<br>不满意:{:round($vo['answer3']/($vo['sum']),2)*100}%<br>
                                <a href="javascript:parent.openIframeLayer('{:url('AdminQuest/answerlist',array('id'=>$vo['id']))}','{$vo.name}',{});" class="layui-btn layui-btn-normal layui-btn-xs">查看匿名建议</a>
                            </td>
                            <else/>
                            <td>
                                暂无评价
                            </td>
                            </if>
                            <td>
                                <a href="{:url('AdminQuest/edit',array('id'=>$vo['id']))}" class="layui-btn layui-btn-xs">编辑</a>
                                <a href="{:url('AdminQuest/delete',array('id'=>$vo['id']))}" class="js-ajax-delete layui-btn layui-btn-danger layui-btn-xs">{:lang('DELETE')}</a>
                                <a href="javascript:parent.openIframeLayer('{:url('AdminQuest/title',array('id'=>$vo['id']))}','{$vo.name}',{});" class="layui-btn layui-btn-normal layui-btn-xs">问题管理</a>
                            </td>
                        </tr>
                        </foreach>
                    </tbody>
                </table>
            </div>
        </div>        
    </div>

<include file="public@footer"/>
